<!-- ONE STEP TO INSTALL PAGE UP FOR...: 1. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Put this code into the BODY of your HTML document --> <BODY> <CENTER> <SCRIPT LANGUAGE="JavaScript"> <!-- This script and many more are available online from --> <!-- The JavaScript Source!! http://javascriptsource.com --> <!-- Begin today = new Date() var thisyear = today.getYear() var thismonth = today.getMonth() var thisdate = today.getDate() var thatyear = 97 var thatmonth = 6 var thatdate = 15 var prestring = "The JavaScript Source has been up for <FONT COLOR='red'>" var fromyears = (thisyear - thatyear) if (thisyear >= 2000) fromyears = fromyears - 1900 var datenumber = (thisdate + thatdate) if (thismonth == 0) monthdates = (31) else if (thismonth == 1) monthdates = (28) else if (thismonth == 2) monthdates = (31) else if (thismonth == 3) monthdates = (30) else if (thismonth == 4) monthdates = (31) else if (thismonth == 5) monthdates = (30) else if (thismonth == 6) monthdates = (31) else if (thismonth == 7) monthdates = (31) else if (thismonth == 8) monthdates = (30) else if (thismonth == 9) monthdates = (31) else if (thismonth == 10) monthdates = (30) else if (thismonth == 11) monthdates = (31) if (fromyears == 0) yearssince = (prestring) else if (fromyears == 1) yearssince = (prestring + " 1 year") else yearssince = (prestring + fromyears + " years") if (thisdate > thatdate) predatessince = (thisdate - thatdate) else predatessince = (thisdate + monthdates - thatdate) if (predatessince == 0) datessince = ("no days.") else if (predatessince == 1) datessince = ("1 day.") else datessince = (predatessince + " days.") if (thisyear > thatyear) { if (thismonth >= thatmonth) premonthssince = (thismonth - thatmonth) else premonthssince = (12 + thismonth - thatmonth) } else premonthssince = (thismonth - thatmonth) if (monthdates < datenumber) premonthssincetwo = (premonthssince + 1) else premonthssincetwo = (premonthssince) if (premonthssincetwo == 0) monthssince = (" ") else if (premonthssincetwo == 1) monthssince = ("1 month") else monthssince = (premonthssincetwo + " months") if (yearssince == prestring) commaone = (" ") else { if (monthssince == " ") (commaone = " and ") else commaone = (", ") } if (commaone == " and ") commatwo = (" ") else if (commaone == ", ") commatwo = (", and ") else if (yearssince == prestring) { if (monthssince == " ") (commatwo = " ") else commatwo = (" and ") } var finalstring = "" finalstring += (yearssince) finalstring += (commaone) finalstring += (monthssince) finalstring += (commatwo) finalstring += (datessince) document.write(finalstring) // End --> </SCRIPT> </FONT> </CENTER> <!-- Script Size: 2.71 KB -->
1998 Copyright (C) Next Step All Rights Reserved